package tech.aistar.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import tech.aistar.mapper.TicketTypeMapper;
import tech.aistar.pojo.TicketType;

@Async
@Service
public class TicketTypeServiceImpl implements TicketTypeService {
    @Autowired
    private TicketTypeMapper ticketTypeMapper;

    @Override
    public Double getPriceByAttractionAndName(Integer attraction_id, String name) {
        return ticketTypeMapper.getPriceByAttractionAndName(attraction_id, name);
    }

    @Override
    public TicketType getById(Integer id) {
        return ticketTypeMapper.getById(id);
    }

    @Override
    public int delById(Integer id) {
        return ticketTypeMapper.delById(id);
    }

    @Override
    public int save(TicketType ticketType) {
        return ticketTypeMapper.save(ticketType);
    }

    @Override
    public int update(TicketType ticketType) {
        return ticketTypeMapper.update(ticketType);
    }
}
